<template>
  <el-container>
    <el-header>Header</el-header>
    <el-container>
      <el-row class="tac">
        <el-col :span="2">
          <el-menu
            default-active="2"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b">
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>穿越火线</span>
              </template>
              <el-menu-item-group>
                <template slot="title">团队</template>
                <el-menu-item index="1-1">1号房</el-menu-item>
                <el-menu-item index="1-2">2号房</el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="爆破">
                <el-menu-item index="1-3">1号房</el-menu-item>
              </el-menu-item-group>
              <el-submenu index="1-4">
                <template slot="title">3号房</template>
                <el-menu-item index="1-4-1">VIP套间</el-menu-item>
              </el-submenu>
            </el-submenu>
            <el-menu-item index="2">
              <i class="el-icon-menu"></i>
              <span slot="title">吊打一切</span>
            </el-menu-item>
            <el-menu-item index="3">
              <i class="el-icon-setting"></i>
              <span slot="title">玩玩就行</span>
            </el-menu-item>
          </el-menu>
        </el-col>
      </el-row>
      <el-main>
        <el-table
          :data="tableData"
          border
          style="width: 100%">
          <el-table-column
            fixed
            prop="title"
            label="任务名称"
            width="300">
          </el-table-column>
          <el-table-column
            prop="content"
            label="任务内容"
            width="300">
          </el-table-column>
          <el-table-column
            prop="executor"
            label="实施人"
            width="300">
          </el-table-column>
          <el-table-column
            prop="status"
            label="任务状态"
            width="300">
          </el-table-column>
          <el-table-column
            prop="startTime"
            label="开始时间"
            width="400">
          </el-table-column>
          <el-table-column
            prop="endTime"
            label="结束时间"
            width="300">
          </el-table-column>
          <el-table-column
            fixed="right"
            label="操作"
            width="300">
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
              <el-button type="text" size="small">编辑</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-main>
    </el-container>
  </el-container>
</template>

<style lang="stylus" rel="stylesheet/stylus">
  @import "studyPlan.styl";
</style>
<script type="text/ecmascript-6">
  import { StudyList } from './studys'
  export default {
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClick(row) {
        console.log(row);
      }
    },
    data() {
      return {
        tableData: StudyList
      }
    }
  }
</script>

